#!/usr/bin/python3

import sys
import json
from netaddr import IPRange

if __name__ == '__main__':
    for line in sys.stdin:
        value = json.loads(line)
        first_arg = value['argument_1']
        second_arg = value['argument_2']
        ip_cidr_list = []
        cidrs = IPRange(first_arg, second_arg).cidrs()
        for cidr in cidrs:
            ip_cidr_list.append(str(cidr))

        res = ",".join(ip_cidr_list)
        output = {'cidr_str': res}
        print(json.dumps(output), end='\n')
        sys.stdout.flush()
